#include <stdio.h>
#include "e_file.h"
#define BUFFSIZE 32

int main(int argc, char ** argv){
	int fd = 0;
	int cnt = 0;
	char buf[BUFFSIZE] = {0};
	if(argc < 2){
		return -1;
	}
	fd = open (argv[1], O_RDONLY);
	if(-1 == fd){
		fprintf(stderr, "open() failed!!!!\n");
	}
	while(1){
		cnt = read (fd, buf, BUFFSIZE);
		if(-1 == fd){
			fprintf(stderr, "read() failed!!!!\n");
			goto ERROR;
		}
		if(0 == cnt){
			break;
		}
		write (1, buf, cnt);
	}
	close (fd);
	return 0;
ERROR:
	close (fd);
	return -1;
}

